<!--
 * @Date: 2024-12-11 16:39:51
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2024-12-13 08:58:11
 * @Description: 静态数据面板
-->
<template>
  <div class="source-static-panel">
    <CodeStudio v-model="dbConfig.dataValue" mode="text" />
  </div>
</template>

<script setup>
import { ref, reactive, computed } from 'vue';
import { pluginManager } from '@hp/utils/pluginManager.js'

const CodeStudio = pluginManager.attrEditors['code-studio']

const props = defineProps({
  schema: { type: Object },
  dataSource: { type: Object }
})

// 数据集
const dbState = reactive({
  cfgKey: 'staticConfig'
})
// 属性配置
const dbConfig = computed(() => {
  return props.dataSource[dbState.cfgKey]
})

</script>

<style lang="scss" scoped>
.source-static-panel {
  height: 100%;
  :deep(.el-textarea),
  :deep(.el-textarea__inner) {
    height: 100% !important;
  }
}
</style>